include( 'shared.lua' ) --Tell the client to load shared.lua
include( 'init.lua' )
include( 'cl_hud.lua' )
include( 'cl_menu_citizen.lua' )

----------------------------------------------------------------------------------------------------------

--ENTRY MENU

----------------------------------------------------------------------------------------------------------

local function entry_menu()

	local entry_frame = vgui.Create("DFrame")
	entry_frame:SetBackgroundBlur(true)
	entry_frame:SetVisible(true)
	entry_frame:MakePopup()
	entry_frame:SetDraggable(false)
	entry_frame:ShowCloseButton(false)
	entry_frame:SetPos((ScrW() / 2) - 200, (ScrH() / 2) - 200)
	entry_frame:SetSize(400, 400)
	entry_frame:SetTitle("User Database System")
		
	local entry_sheet = vgui.Create("DPropertySheet", entry_frame)	
	entry_sheet:SetPos(20, 30)
	entry_sheet:SetSize(360, 340)
	
	local login_panel = vgui.Create("DPanel")
	login_panel:SetPos(30, 30)
	login_panel:SetSize(300, 200)
		
		local username = vgui.Create("DTextEntry", login_panel)		
		username:SetPos(30, 45)
		username:SetSize(200, 20)
		username:SetEditable(true)
		username:SetEnterAllowed(true)
				
		local username_label = vgui.Create("DLabel", login_panel)
				
		username_label:SetPos(30, 30)
		username_label:SetFont("default")
		username_label:SetText("Username:")
		username_label:SetTextColor(Color(255, 255, 255, 255))
		username_label:SizeToContents()

		local password = vgui.Create("DTextEntry", login_panel)		
		password:SetPos(30, 90)
		password:SetSize(200, 20)
		password:SetEditable(true)
		password:SetEnterAllowed(true)
	
		local password_label = vgui.Create("DLabel", login_panel)
				
		password_label:SetPos(30, 75)
		password_label:SetFont("default")
		password_label:SetText("Password:")
		password_label:SetTextColor(Color(255, 255, 255, 255))
		password_label:SizeToContents()
		
	local new_panel = vgui.Create("DPanel")
	new_panel:SetPos(30, 30)
	new_panel:SetSize(300, 200)

		local username = vgui.Create("DTextEntry", new_panel)		
		username:SetPos(30, 45)
		username:SetSize(200, 20)
		username:SetEditable(true)
		username:SetEnterAllowed(true)
				
		local username_label = vgui.Create("DLabel", new_panel)
				
		username_label:SetPos(30, 30)
		username_label:SetFont("default")
		username_label:SetText("Username:")
		username_label:SetTextColor(Color(255, 255, 255, 255))
		username_label:SizeToContents()

		local password = vgui.Create("DTextEntry", new_panel)		
		password:SetPos(30, 90)
		password:SetSize(200, 20)
		password:SetEditable(true)
		password:SetEnterAllowed(true)
	
		local password_label = vgui.Create("DLabel", new_panel)
				
		password_label:SetPos(30, 75)
		password_label:SetFont("default")
		password_label:SetText("Password:")
		password_label:SetTextColor(Color(255, 255, 255, 255))
		password_label:SizeToContents()

				
	
	entry_sheet:AddSheet("Log In", login_panel, "gui/silkicons/group", true, true, "Existing users.")
	entry_sheet:AddSheet("New User", new_panel, "gui/silkicons/user", true, true, "New users.")

end

concommand.Add( "entry_menu", entry_menu )